<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="display" uri="http://displaytag.sf.net" %>

<div id="rightPan">
	<div id="rightbodyPan">
		<div align="center"><p style=" font-size: 24px; padding: 10px 0 5px 0;" >เกณฑ์ขนาดปลอกคอสุนัข</p></div>
		<div id="headerTab">
			<a style="width: 80px;" href="<s:url action="scollar_get" namespace="/admin"/>">เรียกดูข้อมูล</a>
			<a style="width: 120px;" id="clicked">ค้นหา/แก้ไข ข้อมูล</a>
		</div>
		
		<script type="text/javascript">
			function search1(){
				document.getElementById( 'scollar_search1' ).submit();	
			}
			
			function search2(){
				document.getElementById( 'scollar_search2' ).submit();	
			}
			
			function edit()
			{
				if ( document.getElementById( 'sizes' ).value != -1
					&& document.getElementById( 'types' ).value != -1 )
				{
					document.getElementById( 'scollar_edit' ).submit();
				}
			}
		</script>
		
		<s:form id="scollar_search1" action="scollar_search1" theme="simple" method="post">
			<table>
				<tr>
					<td style="padding-top: 30px; " id="slabel">ชนิดของปลอกคอสุนัข:</td>
					<td style="padding-top: 30px;">
						<s:select list="types" key="scollar.types" id="types"
						headerKey="-1" headerValue="" onchange="search1();"/>
					</td>
				</tr>
			</table>
		</s:form>
		
		<s:form id="scollar_search2" action="scollar_search2" theme="simple" method="post">
			<table>
				<tr>
					<td style="padding-top: 30px; " id="slabel">เกณฑ์ขนาดปลอกคอสุนัข:</td>
					<td style="padding-top: 30px;">
						<s:select list="sizes" key="scollar.sizes" id="sizes"
						headerKey="-1" headerValue="" onchange="search2();"/>
					</td>
				</tr>
			</table>
		</s:form>
		
		<s:form id="scollar_edit" action="scollar_edit" theme="simple" method="post">
			<table>
				<tr>
					<td style="padding-top: 30px; " id="slabel">ความกว้างน้อยสุด:</td>
					<td style="padding-top: 30px; " >
						<s:textfield key="scollar.minWidht" maxlength="3" size="5"/>
						ซม. - มากสุด<s:textfield key="scollar.maxWidht" maxlength="3" size="5"/>ซม.
					</td>
				</tr>
				<tr>
					<td id="slabel">ความยาวน้อยสุด:</td>
					<td>
						<s:textfield key="scollar.minLength" maxlength="3" size="5"/>
						ซม. - มากสุด<s:textfield key="scollar.maxLength" maxlength="3" size="5"/>ซม.
					</td>
				</tr>
			</table>
			
			<div align="center" style=" padding-top: 10px;">
				<input onclick="edit()" type="button" value="แก้ไข" id="button"></input>
			</div>
		</s:form>

	</div>
</div>

